﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZhiLiangShu_MingXi.aspx.cs" Inherits="syc.Sale.ZhiLiangShu_MingXi" %>


<head runat="server">
    <title></title>
</head>
<body>
  <script type="text/javascript" language="javascript" src="/common.js"></script>
  <form id="form1" runat="server">
    <div id="wintop" class="wintop">
        质量证明书明细信息</div>
     <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <asp:Button ID="Add" runat="server" CssClass="button" Text="添加" onclick="Add_Click" 
                          />
        <asp:Button ID="Save" runat="server" CssClass="button" Text="保存" 
                        onclick="Save_Click"  />
        <asp:Button ID="Button_Delete" runat="server" Text="删 除" CssClass="button" 
            UseSubmitBehavior="False" onclick="Button_Delete_Click"  OnClientClick="if(!confirm('确认删除该条记录吗?')) return false;"/>     
         <asp:Button ID="Cancel" runat="server" CssClass="Button" onclick="Cancel_Click" 
             Text="取消" />
         <input id="Button" type="button" value="返回"  
             onclick="document.location.href='ZhiLiangShu_Sign.aspx'" class="button" />
    
    </asp:Panel>
     <asp:Panel ID="Panel2" runat="server" CssClass="panel" Visible="false">
       <table width="600" border="1" cellspacing="0" bordercolor="Gray">
  <tr>
    <td rowspan="2"><div align="center">产品批号</div></td>
    <td rowspan="2"><div align="center">管坯序号</div></td>
    <td rowspan="2"><div align="center">炉号</div></td>
    <td colspan="6"><div align="center">规格及重量</div></td>
  </tr>
  <tr>
    <td><div align="center">外径</div></td>
    <td><div align="center">壁厚</div></td>
    <td><div align="center">长度(m)</div></td>
    <td><div align="center">捆数</div></td>
    <td><div align="center">支数</div></td>
    <td><div align="center">重量</div></td>
  </tr>
  <tr>
    <td><div align="center">
        <asp:TextBox ID="PiHao" runat="server" Width="100px" CssClass="intxt1"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="PeHao" runat="server" Width="100px" CssClass="intxt1"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="LuHao" runat="server" Width="100px" CssClass="intxt1"></asp:TextBox>
        </div></td>
    <td colspan="2"><div align="center">
        <asp:TextBox ID="GuiGe" runat="server" Width="70px" CssClass="intxt1"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="ChangDu" runat="server" Width="70px" CssClass="intxt1" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="捆数" runat="server" Width="70px" CssClass="intxt1" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="ZhiShu" runat="server" Width="70px" CssClass="intxt1" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="ZhongLiang" runat="server" Width="80px" CssClass="intxt1" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
  </tr>
</table>

    </asp:Panel>

    <asp:Panel ID="Panel3" runat="server" CssClass="panel2" >
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
    
    
   <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#d0d0d0">
	            <tr>
		            <td class="grid-title">质量证明书       <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand="SELECT * FROM [质量书明细] WHERE ([质量书ID] = @质量书ID)"                             
                             
                            >
                            <SelectParameters>
                                <asp:QueryStringParameter Name="质量书ID" QueryStringField="ID" Type="Int32" />
                            </SelectParameters>
                           
                            </asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                             AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" DataSourceID="SqlDataSource1" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>
                             <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:Button ID="Button1" runat="server" CommandName="Select" Text="选择" CssClass="hide"/>
                                        <img src="/Icons/online.gif" style="margin-top:2px;" alt="" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"  
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" 
                                    ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="产品批号" HeaderText="产品批号" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                    
                                <asp:BoundField DataField="管坯序号" HeaderText="管坯号" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="70" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="70"></ItemStyle>
                                </asp:BoundField>
                   
                                <asp:BoundField DataField="炉号" HeaderText="炉号" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>    
                                  
                                <asp:BoundField DataField="规格" HeaderText="规格" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-Width="70" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle CssClass="grid" Width="70px"></ItemStyle>
                                </asp:BoundField>    
                                
                                <asp:BoundField DataField="长度" HeaderText="长度" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="捆数" HeaderText="捆数" 
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="支数" HeaderText="支数" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="重量" HeaderText="重量" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    ItemStyle-HorizontalAlign="center" ItemStyle-Width="100" >
<HeaderStyle CssClass="grid-header"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="送检" Visible="False" >
                                    <ItemTemplate>                                                                           
                                        <asp:CheckBox ID="CheckBox" runat="server"  Checked='<%# Bind("送检") %>' ></asp:CheckBox>
                                    </ItemTemplate>
                                   <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="100px"></ItemStyle>
                                </asp:TemplateField>                              
                                  <asp:TemplateField HeaderText="操   作">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="Button" runat="server" Text="理化参数" CommandName='<%# Eval("ID")+"\t"+Eval("炉号") %>'
                                            onclick="LinkButton_Click" ForeColor="#6666FF"></asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                </asp:TemplateField>
                            </Columns>
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                 <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>
    
    </form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
            rows[i].onclick = function() { this.firstChild.firstChild.click(); };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }

</script>
</body>
</html>
